
import java.io.File;

import com.hogofwar.DJbot.BasePlugin;
import com.hogofwar.DJbot.IRCBase;

public class COM_stats implements BasePlugin {

	public void start(final IRCBase irc, final String[] extra, String channel,
			String sender, String hostname, boolean usename) {
		String start = "";
		if (usename == true) {
			start = sender + ": ";
		}
		String tosend = "Since I have been started I have received "+IRCBase.messagesreceived+" messages, "+IRCBase.factoidsgiven+" factoids have been called and "+IRCBase.factoidsset+" factoids have been set.";
	
		irc.sendMessage(channel, start + "" + tosend);
		 tosend = "File sizes: Chat.db is "+ new File("chat.db").length()/1024+"KB. Factoids.db is "+ new File("factoids.db").length()/1024+"KB. Tell.db is "+ new File("tell.db").length()/1024+"KB.";
		irc.sendMessage(channel, tosend);
	}

	public String help() {
		return "Stats - Shows some breif stats.!";
		// TODO Auto-generated method stub

	}

	public String version() {
		return "Stats version 1";
		// TODO Auto-generated method stub

	}

	@Override
	public String restrict() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Boolean hide() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String aliases() {
		// TODO Auto-generated method stub
		return null;
	}

}
